using System;
using System.Collections.Generic;
using System.Text;
using XinBang.Entity;
using XinBang.DAL;

namespace XinBang.BLL
{
    public class SendBL
    {
        //private IOrderDA<Order> od = BusinessLogicFactory.GetOrderDA();
        private ISendDA<Send> sd = BusinessLogicFactory.GetSendDA();

        public IList<Send> GetAllSends()
        {
            return sd.GetAllSends();
        }

        public void InsertSend(Send send)
        {
            sd.Insert(send);
        }

        public void UpdateSend(Send send)
        {
            sd.Update(send);
        }

        public void DeleteSend(Send send)
        {
            sd.Delete(send);
        }

        public Send GetDefaultSendMethod()
        {
            return sd.GetAllSends()[0];
        }

        public Send GetSendById(int senid)
        {
            return sd.Get(senid);
        }
    }
}
